

sub_dict = {"lcase":"lower()","ucase":"upper()","strip":"strip()"}
special = ["print"] ##function calls not needing assignments like print 

def handle_function_sub(vname,fname,param_list):
    output =""
    if len(param_list)==0 :
        newfname = sub_dict[fname]
        output = vname + " = " + vname+"."+newfname
    return output

def handle_function_fc(vname,fname,param_list):
    output=""
    if len(param_list)==0 :
        if fname not in special:
            output = vname + " = " + "pav" + fname + "(" + vname + ")"
        if fname in special:
            output = fname + "("+vname+")"


    if len(param_list)>0:
        parameter = ","
        for i in range(0, len(param_list)):
            parameter += param_list[i] + ","
        parameter= parameter[:-1]
        output = vname + " = " + "pav"+fname+"("+vname+parameter+")"


    return output

#pavum functions

def pavleft(a,no):
    return a[:no]


def pavint(a):
    return int(a)

def pavstr(a):
    return str(a)

